function GetURLParameter(sParam) {
    var sPageURL = window.location.search.substring(1);
    var sURLVariables = sPageURL.split('&');
    for (var i = 0; i < sURLVariables.length; i++)
    {
        var sParameterName = sURLVariables[i].split('=');
        if (sParameterName[0] == sParam)
        {
            return sParameterName[1];
        }
    }
};
        $(document).ready(function() {
            var options = {
            currentPage: 1,
            totalPages: $('#AjaxProduct').attr('totalPage'),
            onPageClicked: function(e, originalEvent, type, page){
            $.ajax({
            type: "POST",
                    url: "/page/ajaxProduct.jsp",
                    data: {page: page,category: GetURLParameter('category')},
                    beforeSend: function() {
                    //$('#AjaxProduct').html("<img src='../template/img/loading.gif' />");
                    $('#AjaxProduct').animate({opacity: 0.25});
                    },
                    success: function(html) {
                    $('#AjaxProduct').html(html);
                            $('#AjaxProduct').animate({opacity: 1});
                    }
            });
            }
            };
            $('#Paging').bootstrapPaginator(options);
            
            
            var options2 = {
            currentPage: 1,
            totalPages: $('#AjaxProduct').attr('totalPage'),
            onPageClicked: function(e, originalEvent, type, page){
            $.ajax({
            type: "POST",
                    url: "/page/ajaxProduct.jsp",
                    data: {page: page,type:2},
                    beforeSend: function() {
                    //$('#AjaxProduct').html("<img src='../template/img/loading.gif' />");
                    $('#AjaxProduct2').animate({opacity: 0.25});
                    },
                    success: function(html) {
                    $('#AjaxProduct2').html(html);
                            $('#AjaxProduct2').animate({opacity: 1});
                    }
            });
            }
            };
            $('#PagingNew').bootstrapPaginator(options2);
        });
        
        

